package cn.flyboy.mapper;

import cn.flyboy.entity.Information;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface InfoMapper {
    @Select("select * from information")
    List<Information> selectAllInfo();

    @Select("select * from information where exam=#{param1} or t_name=#{param2}")
    List<Information> selectAllExamInfo(String exam, String t_name);

    @Select("select * from information where t_name=#{param1}")
    List<Information> selectExamInfoOfTea(String t_name);

    @Insert("insert into information(info,times,exam,t_name) value(#{info},#{times},#{exam},#{t_name})")
    int saveInfo(Information info);

    @Delete("delete from information where id=#{id}")
    int delInfo(int id);
}
